<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>网络笔记后台管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/css/common.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/css/blogadd.css">
	<style type="text/css" rel="stylesheet">
		form {
			margin: 0;
		}
		.editor {
			margin-top: 5px;
			margin-bottom: 5px;
		}
	</style>
</head>
<body>
<%--	<div class="layui-container main">--%>
		<div class="layui-row layui-col-space20">
			<div class="layui-col-md12">
				<p>
		        	<span class="layui-breadcrumb" style="visibility: visible;">
			          	<a href="index.jsp">笔记管理系统</a><span lay-separator="">/</span>
			          	<a href="index.jsp">后台首页</a><span lay-separator="">/</span>
			          	<a><cite>笔记添加</cite></a>
		        	</span>
		      	</p>
			</div>
			<div class="layui-col-md12">
				<div class="layui-form layui-form-pane">
					<form action="${pageContext.servletContext.contextPath}/note/add" method="post">
						<div class="layui-form-item">
							<label for="L_title" class="layui-form-label">标题</label>
							<div class="layui-input-block">
								<input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input" width="50">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">类型</label>
							<div class="layui-input-block">
								<input type="radio" name="type" value="0" title="个人" checked>
								<input type="radio" name="type" value="1" title="分享">
								<input type="radio" name="type" value="2" title="其他">
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<div class="layui-input-block">
								<label class="layui-form-label">编辑内容</label>
								<div class="layui-text">
                                    <textarea id="demo" name="content"></textarea>
<%--									<textarea id="contents" name="content" style="width:800px;height:400px;margin: 0 auto"></textarea>--%>
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<button class="layui-btn" lay-filter="*" lay-submit>保存</button>
						</div>
					</form>
				</div>
			</div>
		</div>
<%--	</div>--%>
</body>
<script src="${pageContext.request.contextPath}/static/js/jquery-3.2.1.js"></script>
<script src="${pageContext.request.contextPath}/layui/layui.all.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/javascript/blogadd.js"></script>
<script type="text/javascript">
    layui.use('layedit', function(){
        var layedit = layui.layedit;
        layedit.build('demo'); //建立编辑器
    });
	// var ue=UE.getEditor("contents",{
	// 	//这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
	// 	toolbar:[['FullScreen','Source','Undo','Redo','bold','test',]],
	// 	//focus时自动清空初始化时的内容
	// 	autoClearinitialContent: true,
	// 	//关闭字数统计
	// 	wordCount: false,
	// 	//关闭elementPath
	// 	elementPathEnabled:false,
	// 	//默认的编辑区域高度
	// 	initialFrameHeight:300,
	// 	allHtmlEnabled: false,//提交到后台的数据是否包含整个html字符串
	// 	allowDivTransToP: false//阻止div标签自动转换为p标签
	// });
</script>
</html>